﻿#ifndef FINDFUNDNAMETHREAD_H
#define FINDFUNDNAMETHREAD_H
#include <QThread>
#include "FindFund.h"
#include <functional>
#include<QDir>
using namespace std;
class FindFundNameThread : public QThread
{
    Q_OBJECT
public:
    explicit FindFundNameThread(QObject* parent = 0);
    void FindFundName(FindFund* FindFund);
    void FindHistoryOne(FindFund* FindFund,const int code, const int Size);
    void FindAllHistoryAll(FindFund* FindFund,const int Size);
    void FindAllHistoryWriteAll(FindFund* FindFund, const QString& path, const int Size);
    void WriteHistoryAll(FindFund* FindFund,QList<int> code, const QString& path);
    void ReadHistoryAll(FindFund* FindFund, QFileInfoList file);
protected:
    virtual void run() override;
    const bool isNullptr(FindFund* FindFund);
signals:
    void FindCode(int code);
    void ret(long long value);
    void retCodeAndCount(int code,int count);
    void retCodeAndCountAndFileName(int code, int count,QString FileName);
private:
    function<void()> m_fun;
};
#endif // !FINDFUNDNAMETHREAD_H
